// component/alert_msg/alert_msg.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
     
  },

  /**
   * 组件的初始数据
   */
  data: {
		order:[
			{
				num:'20181015112350',state:'5分钟前'
			},
			{
				num:'20181015112350',state:'已完成'
			},
			{
				num:'20181015112350',state:'5分钟前'
			},
			{
				num:'20181015112350',state:'已完成'
			}
		],
		orderall:[
			{name:'已完成',type:"yiwancheng"},
			{name:'待完成',type:"daiwancheng"},
			{name:'已接单',type:"yijiedan"},
		]
  },

  /**
   * 组件的方法列表
   */
  methods: {
	start_roaddeil(e){
		var id = e.currentTarget.dataset.id;
		console.log(id)
		wx.navigateTo({
			url:'../roaddeil/roaddeil?id=' + id,					
		})   
	},
	orderAll(e){	 
		let index = e.currentTarget.dataset.index;		 
		const myEventDetail = {type:this.data.orderall[index].type} // detail对象，提供给事件监听函数
		const myEventOption = {} // 触发事件的选项
		this.triggerEvent('openorder', myEventDetail, myEventOption)
	},
  }
})
